﻿// ----------------------------------------------------------------
// Description : 实体类,该文件由MyGeneration生成
// Author      : 
// Create date : 2009-12-27
// ----------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.Common;
using Microsoft.Practices.EnterpriseLibrary.Data;

namespace ITOMMS.Entity
{
	/// <summary>
	///	VwUser Entity
	///	VwUser Entity
	/// </summary>
	[Serializable]
	public class VwUserEntity : BaseEntity<VwUserEntity,int>
	{
		
		#region 私有成员			
		
		private int _ID; 
		private int _RoleGroup; 
		private string _UserName; 
		private string _PWD; 
		private string _RealName; 
		private string _sex; 
		private int? _DepartmentID; 
		private string _DepartmentName; 
		private string _job; 
		private int _State; 
		private string _WorkNo; 
		private string _Email; 
		private string _Tel; 
		private string _MSN; 
		private string _QQ; 
		private string _Remark; 
		private DateTime? _CreateDate; 
		private int? _CreateBy; 
		private DateTime? _ModifyDate; 
		private int? _ModifyBy; 
		private string _CompanyName; 
		private string _LawPerson; 
		private string _linkMan; 
		private string _linkManMail; 
		private string _Mobile; 
		private string _Phone; 
		private string _FAX; 
		private string _URL; 
		private string _sendmsgAddress; 
		private string _sendGoodsAddress; 
		private string _ZIP; 
		private DateTime? _LastLoginTime; 
		private int? _LoginNum; 
		private string _公司地址; 
		private string _公司邮箱; 
		private string _服务项目; 
		private string _公司规模; 
		private string _公司网站; 
		private string _负责人A; 
		private string _负责人B; 
		private string _负责人A电话; 
		private string _负责人B电话; 
		private string _负责人A手机; 
		private string _负责人B手机; 
		private DateTime? _工作时间; 
		private bool? _五天八小时; 
		private bool? _六天八小时; 
		private DateTime? _上班时间; 
		private DateTime? _下班时间; 
		private string _台式电脑; 
		private string _笔记本电脑; 
		private string _服务器; 
		private string _路由器; 
		private string _集线器; 
		private string _Moden; 
		private string _交换机; 
		private string _电话交换; 
		private string _VPN; 
		private string _邮件服务; 
		private string _网站服务; 
		private string _打印机; 
		private string _复印机; 
		private string _扫描仪; 
		private string _其他要求; 
		private string _五八小时服务; 
		private int? _应急响应次数; 
		private string _备注; 
		private int? _负责人; 
		private DateTime? _日期时间; 
		private int? _AppendixID; 
		private int _SEQNO;
		#endregion


		
		#region 默认( 空 ) 构造函数
		/// <summary>
		/// 默认构造函数
		/// </summary>
		public VwUserEntity()
		{
			_ID = 0; 
			_RoleGroup = 0; 
			_UserName = String.Empty; 
			_PWD = String.Empty; 
			_RealName = String.Empty; 
			_sex = String.Empty; 
			_DepartmentID =  null; 
			_DepartmentName = String.Empty; 
			_job = String.Empty; 
			_State = 0; 
			_WorkNo = String.Empty; 
			_Email = String.Empty; 
			_Tel = String.Empty; 
			_MSN = String.Empty; 
			_QQ = String.Empty; 
			_Remark = String.Empty; 
			_CreateDate =  null; 
			_CreateBy =  null; 
			_ModifyDate =  null; 
			_ModifyBy =  null; 
			_CompanyName = String.Empty; 
			_LawPerson = String.Empty; 
			_linkMan = String.Empty; 
			_linkManMail = String.Empty; 
			_Mobile = String.Empty; 
			_Phone = String.Empty; 
			_FAX = String.Empty; 
			_URL = String.Empty; 
			_sendmsgAddress = String.Empty; 
			_sendGoodsAddress = String.Empty; 
			_ZIP = String.Empty; 
			_LastLoginTime =  null; 
			_LoginNum =  null; 
			_公司地址 = String.Empty; 
			_公司邮箱 = String.Empty; 
			_服务项目 = String.Empty; 
			_公司规模 = String.Empty; 
			_公司网站 = String.Empty; 
			_负责人A = String.Empty; 
			_负责人B = String.Empty; 
			_负责人A电话 = String.Empty; 
			_负责人B电话 = String.Empty; 
			_负责人A手机 = String.Empty; 
			_负责人B手机 = String.Empty; 
			_工作时间 =  null; 
			_五天八小时 =  null; 
			_六天八小时 =  null; 
			_上班时间 =  null; 
			_下班时间 =  null; 
			_台式电脑 = String.Empty; 
			_笔记本电脑 = String.Empty; 
			_服务器 = String.Empty; 
			_路由器 = String.Empty; 
			_集线器 = String.Empty; 
			_Moden = String.Empty; 
			_交换机 = String.Empty; 
			_电话交换 = String.Empty; 
			_VPN = String.Empty; 
			_邮件服务 = String.Empty; 
			_网站服务 = String.Empty; 
			_打印机 = String.Empty; 
			_复印机 = String.Empty; 
			_扫描仪 = String.Empty; 
			_其他要求 = String.Empty; 
			_五八小时服务 = String.Empty; 
			_应急响应次数 =  null; 
			_备注 = String.Empty; 
			_负责人 =  null; 
			_日期时间 =  null; 
			_AppendixID =  null; 
			_SEQNO = 0;
		}
		#endregion
		
		#region 属性值校验
		
		/// <summary>
		/// 属性值校验
		/// </summary>
		public bool CheckValues()
		{
			bool bResult = true;
			string strError = "";
		
			if ( _ID ==  0)
			{
				bResult = false;
				strError += "\r\n 非空值不能为: "+_ID;
			}
			
			if ( _RoleGroup ==  0)
			{
				bResult = false;
				strError += "\r\n 非空值不能为: "+_RoleGroup;
			}
			
			if ( _UserName ==  String.Empty)
			{
				bResult = false;
				strError += "\r\n 非空值不能为: "+_UserName;
			}
			
			if ( _State ==  0)
			{
				bResult = false;
				strError += "\r\n 非空值不能为: "+_State;
			}
			
			if( !bResult )
					throw new ArgumentOutOfRangeException(strError);
			return bResult;
			
		}
		
		#endregion
		
		
		
	
		#region Required Fields Only Constructor
		
		/// <summary>
		/// required (not null) fields only constructor
		/// </summary>
		public VwUserEntity(
		int para_ID, int para_RoleGroup, string para_UserName, int para_State		)
		: this()
		{
					_ID = para_ID;
			_RoleGroup = para_RoleGroup;
			_UserName = para_UserName;
			_PWD = String.Empty;
			_RealName = String.Empty;
			_sex = String.Empty;
			_DepartmentID = null;
			_DepartmentName = String.Empty;
			_job = String.Empty;
			_State = para_State;
			_WorkNo = String.Empty;
			_Email = String.Empty;
			_Tel = String.Empty;
			_MSN = String.Empty;
			_QQ = String.Empty;
			_Remark = String.Empty;
			_CreateDate = null;
			_CreateBy = null;
			_ModifyDate = null;
			_ModifyBy = null;
			_CompanyName = String.Empty;
			_LawPerson = String.Empty;
			_linkMan = String.Empty;
			_linkManMail = String.Empty;
			_Mobile = String.Empty;
			_Phone = String.Empty;
			_FAX = String.Empty;
			_URL = String.Empty;
			_sendmsgAddress = String.Empty;
			_sendGoodsAddress = String.Empty;
			_ZIP = String.Empty;
			_LastLoginTime = null;
			_LoginNum = null;
			_公司地址 = String.Empty;
			_公司邮箱 = String.Empty;
			_服务项目 = String.Empty;
			_公司规模 = String.Empty;
			_公司网站 = String.Empty;
			_负责人A = String.Empty;
			_负责人B = String.Empty;
			_负责人A电话 = String.Empty;
			_负责人B电话 = String.Empty;
			_负责人A手机 = String.Empty;
			_负责人B手机 = String.Empty;
			_工作时间 = null;
			_五天八小时 = null;
			_六天八小时 = null;
			_上班时间 = null;
			_下班时间 = null;
			_台式电脑 = String.Empty;
			_笔记本电脑 = String.Empty;
			_服务器 = String.Empty;
			_路由器 = String.Empty;
			_集线器 = String.Empty;
			_Moden = String.Empty;
			_交换机 = String.Empty;
			_电话交换 = String.Empty;
			_VPN = String.Empty;
			_邮件服务 = String.Empty;
			_网站服务 = String.Empty;
			_打印机 = String.Empty;
			_复印机 = String.Empty;
			_扫描仪 = String.Empty;
			_其他要求 = String.Empty;
			_五八小时服务 = String.Empty;
			_应急响应次数 = null;
			_备注 = String.Empty;
			_负责人 = null;
			_日期时间 = null;
			_AppendixID = null;
		}
		#endregion 

		
		#region 公有属性
			
			/// <summary>
			/// 行号，顺序号。系统默认的属性,对这个属性不要作操作.属性值在架构中已经处理
			/// </summary>
			public virtual int SEQNO
			{
				get { return _SEQNO; }
				set { _SEQNO = value; }
			}
		
			
		/// <summary>
		/// ID
		/// </summary>		
		public virtual int ID
		{
			get { return _ID; }
			set { _ID = value; }
		}
			
		/// <summary>
		/// RoleGroup
		/// </summary>		
		public virtual int RoleGroup
		{
			get { return _RoleGroup; }
			set { _RoleGroup = value; }
		}
			
		/// <summary>
		/// UserName
		/// </summary>		
		public virtual string UserName
		{
			get { return _UserName; }
			set	
			{
				
				if( value == null )
					throw new ArgumentOutOfRangeException("Null value not allowed for UserName", value, "null");
				
				if ( value != null)
					if( value.Length > 30)
						throw new ArgumentOutOfRangeException("Invalid value for UserName", value, value.ToString());
				
				_UserName = value;
			}
		}
			
		/// <summary>
		/// PWD
		/// </summary>		
		public virtual string PWD
		{
			get { return _PWD; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 100)
						throw new ArgumentOutOfRangeException("Invalid value for PWD", value, value.ToString());
				
				_PWD = value;
			}
		}
			
		/// <summary>
		/// RealName
		/// </summary>		
		public virtual string RealName
		{
			get { return _RealName; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 30)
						throw new ArgumentOutOfRangeException("Invalid value for RealName", value, value.ToString());
				
				_RealName = value;
			}
		}
			
		/// <summary>
		/// sex
		/// </summary>		
		public virtual string sex
		{
			get { return _sex; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 3)
						throw new ArgumentOutOfRangeException("Invalid value for sex", value, value.ToString());
				
				_sex = value;
			}
		}
			
		/// <summary>
		/// DepartmentID
		/// </summary>		
		public virtual int? DepartmentID
		{
			get { return _DepartmentID; }
			set { _DepartmentID = value; }
		}
			
		/// <summary>
		/// DepartmentName
		/// </summary>		
		public virtual string DepartmentName
		{
			get { return _DepartmentName; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 30)
						throw new ArgumentOutOfRangeException("Invalid value for DepartmentName", value, value.ToString());
				
				_DepartmentName = value;
			}
		}
			
		/// <summary>
		/// job
		/// </summary>		
		public virtual string job
		{
			get { return _job; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 30)
						throw new ArgumentOutOfRangeException("Invalid value for job", value, value.ToString());
				
				_job = value;
			}
		}
			
		/// <summary>
		/// State
		/// </summary>		
		public virtual int State
		{
			get { return _State; }
			set { _State = value; }
		}
			
		/// <summary>
		/// WorkNo
		/// </summary>		
		public virtual string WorkNo
		{
			get { return _WorkNo; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 30)
						throw new ArgumentOutOfRangeException("Invalid value for WorkNo", value, value.ToString());
				
				_WorkNo = value;
			}
		}
			
		/// <summary>
		/// Email
		/// </summary>		
		public virtual string Email
		{
			get { return _Email; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 30)
						throw new ArgumentOutOfRangeException("Invalid value for Email", value, value.ToString());
				
				_Email = value;
			}
		}
			
		/// <summary>
		/// Tel
		/// </summary>		
		public virtual string Tel
		{
			get { return _Tel; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for Tel", value, value.ToString());
				
				_Tel = value;
			}
		}
			
		/// <summary>
		/// MSN
		/// </summary>		
		public virtual string MSN
		{
			get { return _MSN; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 30)
						throw new ArgumentOutOfRangeException("Invalid value for MSN", value, value.ToString());
				
				_MSN = value;
			}
		}
			
		/// <summary>
		/// QQ
		/// </summary>		
		public virtual string QQ
		{
			get { return _QQ; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for QQ", value, value.ToString());
				
				_QQ = value;
			}
		}
			
		/// <summary>
		/// Remark
		/// </summary>		
		public virtual string Remark
		{
			get { return _Remark; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 200)
						throw new ArgumentOutOfRangeException("Invalid value for Remark", value, value.ToString());
				
				_Remark = value;
			}
		}
			
		/// <summary>
		/// CreateDate
		/// </summary>		
		public virtual DateTime? CreateDate
		{
			get { return _CreateDate; }
			set { _CreateDate = value; }
		}
			
		/// <summary>
		/// CreateBy
		/// </summary>		
		public virtual int? CreateBy
		{
			get { return _CreateBy; }
			set { _CreateBy = value; }
		}
			
		/// <summary>
		/// ModifyDate
		/// </summary>		
		public virtual DateTime? ModifyDate
		{
			get { return _ModifyDate; }
			set { _ModifyDate = value; }
		}
			
		/// <summary>
		/// ModifyBy
		/// </summary>		
		public virtual int? ModifyBy
		{
			get { return _ModifyBy; }
			set { _ModifyBy = value; }
		}
			
		/// <summary>
		/// CompanyName
		/// </summary>		
		public virtual string CompanyName
		{
			get { return _CompanyName; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 50)
						throw new ArgumentOutOfRangeException("Invalid value for CompanyName", value, value.ToString());
				
				_CompanyName = value;
			}
		}
			
		/// <summary>
		/// LawPerson
		/// </summary>		
		public virtual string LawPerson
		{
			get { return _LawPerson; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 50)
						throw new ArgumentOutOfRangeException("Invalid value for LawPerson", value, value.ToString());
				
				_LawPerson = value;
			}
		}
			
		/// <summary>
		/// linkMan
		/// </summary>		
		public virtual string linkMan
		{
			get { return _linkMan; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 25)
						throw new ArgumentOutOfRangeException("Invalid value for linkMan", value, value.ToString());
				
				_linkMan = value;
			}
		}
			
		/// <summary>
		/// linkManMail
		/// </summary>		
		public virtual string linkManMail
		{
			get { return _linkManMail; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 30)
						throw new ArgumentOutOfRangeException("Invalid value for linkManMail", value, value.ToString());
				
				_linkManMail = value;
			}
		}
			
		/// <summary>
		/// Mobile
		/// </summary>		
		public virtual string Mobile
		{
			get { return _Mobile; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 15)
						throw new ArgumentOutOfRangeException("Invalid value for Mobile", value, value.ToString());
				
				_Mobile = value;
			}
		}
			
		/// <summary>
		/// Phone
		/// </summary>		
		public virtual string Phone
		{
			get { return _Phone; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 15)
						throw new ArgumentOutOfRangeException("Invalid value for Phone", value, value.ToString());
				
				_Phone = value;
			}
		}
			
		/// <summary>
		/// FAX
		/// </summary>		
		public virtual string FAX
		{
			get { return _FAX; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 15)
						throw new ArgumentOutOfRangeException("Invalid value for FAX", value, value.ToString());
				
				_FAX = value;
			}
		}
			
		/// <summary>
		/// URL
		/// </summary>		
		public virtual string URL
		{
			get { return _URL; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 100)
						throw new ArgumentOutOfRangeException("Invalid value for URL", value, value.ToString());
				
				_URL = value;
			}
		}
			
		/// <summary>
		/// sendmsgAddress
		/// </summary>		
		public virtual string sendmsgAddress
		{
			get { return _sendmsgAddress; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 100)
						throw new ArgumentOutOfRangeException("Invalid value for sendmsgAddress", value, value.ToString());
				
				_sendmsgAddress = value;
			}
		}
			
		/// <summary>
		/// sendGoodsAddress
		/// </summary>		
		public virtual string sendGoodsAddress
		{
			get { return _sendGoodsAddress; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 100)
						throw new ArgumentOutOfRangeException("Invalid value for sendGoodsAddress", value, value.ToString());
				
				_sendGoodsAddress = value;
			}
		}
			
		/// <summary>
		/// ZIP
		/// </summary>		
		public virtual string ZIP
		{
			get { return _ZIP; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 10)
						throw new ArgumentOutOfRangeException("Invalid value for ZIP", value, value.ToString());
				
				_ZIP = value;
			}
		}
			
		/// <summary>
		/// LastLoginTime
		/// </summary>		
		public virtual DateTime? LastLoginTime
		{
			get { return _LastLoginTime; }
			set { _LastLoginTime = value; }
		}
			
		/// <summary>
		/// LoginNum
		/// </summary>		
		public virtual int? LoginNum
		{
			get { return _LoginNum; }
			set { _LoginNum = value; }
		}
			
		/// <summary>
		/// 公司地址
		/// </summary>		
		public virtual string 公司地址
		{
			get { return _公司地址; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 50)
						throw new ArgumentOutOfRangeException("Invalid value for 公司地址", value, value.ToString());
				
				_公司地址 = value;
			}
		}
			
		/// <summary>
		/// 公司邮箱
		/// </summary>		
		public virtual string 公司邮箱
		{
			get { return _公司邮箱; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 50)
						throw new ArgumentOutOfRangeException("Invalid value for 公司邮箱", value, value.ToString());
				
				_公司邮箱 = value;
			}
		}
			
		/// <summary>
		/// 服务项目
		/// </summary>		
		public virtual string 服务项目
		{
			get { return _服务项目; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 服务项目", value, value.ToString());
				
				_服务项目 = value;
			}
		}
			
		/// <summary>
		/// 公司规模
		/// </summary>		
		public virtual string 公司规模
		{
			get { return _公司规模; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 公司规模", value, value.ToString());
				
				_公司规模 = value;
			}
		}
			
		/// <summary>
		/// 公司网站
		/// </summary>		
		public virtual string 公司网站
		{
			get { return _公司网站; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 公司网站", value, value.ToString());
				
				_公司网站 = value;
			}
		}
			
		/// <summary>
		/// 负责人A
		/// </summary>		
		public virtual string 负责人A
		{
			get { return _负责人A; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 负责人A", value, value.ToString());
				
				_负责人A = value;
			}
		}
			
		/// <summary>
		/// 负责人B
		/// </summary>		
		public virtual string 负责人B
		{
			get { return _负责人B; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 负责人B", value, value.ToString());
				
				_负责人B = value;
			}
		}
			
		/// <summary>
		/// 负责人A电话
		/// </summary>		
		public virtual string 负责人A电话
		{
			get { return _负责人A电话; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 负责人A电话", value, value.ToString());
				
				_负责人A电话 = value;
			}
		}
			
		/// <summary>
		/// 负责人B电话
		/// </summary>		
		public virtual string 负责人B电话
		{
			get { return _负责人B电话; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 负责人B电话", value, value.ToString());
				
				_负责人B电话 = value;
			}
		}
			
		/// <summary>
		/// 负责人A手机
		/// </summary>		
		public virtual string 负责人A手机
		{
			get { return _负责人A手机; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 负责人A手机", value, value.ToString());
				
				_负责人A手机 = value;
			}
		}
			
		/// <summary>
		/// 负责人B手机
		/// </summary>		
		public virtual string 负责人B手机
		{
			get { return _负责人B手机; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 负责人B手机", value, value.ToString());
				
				_负责人B手机 = value;
			}
		}
			
		/// <summary>
		/// 工作时间
		/// </summary>		
		public virtual DateTime? 工作时间
		{
			get { return _工作时间; }
			set { _工作时间 = value; }
		}
			
		/// <summary>
		/// 五天八小时
		/// </summary>		
		public virtual bool? 五天八小时
		{
			get { return _五天八小时; }
			set { _五天八小时 = value; }
		}
			
		/// <summary>
		/// 六天八小时
		/// </summary>		
		public virtual bool? 六天八小时
		{
			get { return _六天八小时; }
			set { _六天八小时 = value; }
		}
			
		/// <summary>
		/// 上班时间
		/// </summary>		
		public virtual DateTime? 上班时间
		{
			get { return _上班时间; }
			set { _上班时间 = value; }
		}
			
		/// <summary>
		/// 下班时间
		/// </summary>		
		public virtual DateTime? 下班时间
		{
			get { return _下班时间; }
			set { _下班时间 = value; }
		}
			
		/// <summary>
		/// 台式电脑
		/// </summary>		
		public virtual string 台式电脑
		{
			get { return _台式电脑; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 台式电脑", value, value.ToString());
				
				_台式电脑 = value;
			}
		}
			
		/// <summary>
		/// 笔记本电脑
		/// </summary>		
		public virtual string 笔记本电脑
		{
			get { return _笔记本电脑; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 笔记本电脑", value, value.ToString());
				
				_笔记本电脑 = value;
			}
		}
			
		/// <summary>
		/// 服务器
		/// </summary>		
		public virtual string 服务器
		{
			get { return _服务器; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 服务器", value, value.ToString());
				
				_服务器 = value;
			}
		}
			
		/// <summary>
		/// 路由器
		/// </summary>		
		public virtual string 路由器
		{
			get { return _路由器; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 路由器", value, value.ToString());
				
				_路由器 = value;
			}
		}
			
		/// <summary>
		/// 集线器
		/// </summary>		
		public virtual string 集线器
		{
			get { return _集线器; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 集线器", value, value.ToString());
				
				_集线器 = value;
			}
		}
			
		/// <summary>
		/// Moden
		/// </summary>		
		public virtual string Moden
		{
			get { return _Moden; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for Moden", value, value.ToString());
				
				_Moden = value;
			}
		}
			
		/// <summary>
		/// 交换机
		/// </summary>		
		public virtual string 交换机
		{
			get { return _交换机; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 交换机", value, value.ToString());
				
				_交换机 = value;
			}
		}
			
		/// <summary>
		/// 电话交换
		/// </summary>		
		public virtual string 电话交换
		{
			get { return _电话交换; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 电话交换", value, value.ToString());
				
				_电话交换 = value;
			}
		}
			
		/// <summary>
		/// VPN
		/// </summary>		
		public virtual string VPN
		{
			get { return _VPN; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for VPN", value, value.ToString());
				
				_VPN = value;
			}
		}
			
		/// <summary>
		/// 邮件服务
		/// </summary>		
		public virtual string 邮件服务
		{
			get { return _邮件服务; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 邮件服务", value, value.ToString());
				
				_邮件服务 = value;
			}
		}
			
		/// <summary>
		/// 网站服务
		/// </summary>		
		public virtual string 网站服务
		{
			get { return _网站服务; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 网站服务", value, value.ToString());
				
				_网站服务 = value;
			}
		}
			
		/// <summary>
		/// 打印机
		/// </summary>		
		public virtual string 打印机
		{
			get { return _打印机; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 打印机", value, value.ToString());
				
				_打印机 = value;
			}
		}
			
		/// <summary>
		/// 复印机
		/// </summary>		
		public virtual string 复印机
		{
			get { return _复印机; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 复印机", value, value.ToString());
				
				_复印机 = value;
			}
		}
			
		/// <summary>
		/// 扫描仪
		/// </summary>		
		public virtual string 扫描仪
		{
			get { return _扫描仪; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 扫描仪", value, value.ToString());
				
				_扫描仪 = value;
			}
		}
			
		/// <summary>
		/// 其他要求
		/// </summary>		
		public virtual string 其他要求
		{
			get { return _其他要求; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 20)
						throw new ArgumentOutOfRangeException("Invalid value for 其他要求", value, value.ToString());
				
				_其他要求 = value;
			}
		}
			
		/// <summary>
		/// 五八小时服务
		/// </summary>		
		public virtual string 五八小时服务
		{
			get { return _五八小时服务; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 200)
						throw new ArgumentOutOfRangeException("Invalid value for 五八小时服务", value, value.ToString());
				
				_五八小时服务 = value;
			}
		}
			
		/// <summary>
		/// 应急响应次数
		/// </summary>		
		public virtual int? 应急响应次数
		{
			get { return _应急响应次数; }
			set { _应急响应次数 = value; }
		}
			
		/// <summary>
		/// 备注
		/// </summary>		
		public virtual string 备注
		{
			get { return _备注; }
			set	
			{
				
				if ( value != null)
					if( value.Length > 200)
						throw new ArgumentOutOfRangeException("Invalid value for 备注", value, value.ToString());
				
				_备注 = value;
			}
		}
			
		/// <summary>
		/// 负责人
		/// </summary>		
		public virtual int? 负责人
		{
			get { return _负责人; }
			set { _负责人 = value; }
		}
			
		/// <summary>
		/// 日期时间
		/// </summary>		
		public virtual DateTime? 日期时间
		{
			get { return _日期时间; }
			set { _日期时间 = value; }
		}
			
		/// <summary>
		/// AppendixID
		/// </summary>		
		public virtual int? AppendixID
		{
			get { return _AppendixID; }
			set { _AppendixID = value; }
		}
			


		#endregion 	
		
		
        #region DAO操作
		
		
		/// <summary>
        /// 获取所有实体的列表
        /// </summary>
        /// <returns></returns>
        public override List<VwUserEntity> GetAll()
        {
            StringBuilder strSql = new StringBuilder();
			strSql.Append("select [ID],[RoleGroup],[UserName],[PWD],[RealName],[sex],[DepartmentID],[DepartmentName],[job],[State],[WorkNo],[Email],[Tel],[MSN],[QQ],[Remark],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy],[CompanyName],[LawPerson],[linkMan],[linkManMail],[Mobile],[Phone],[FAX],[URL],[sendmsgAddress],[sendGoodsAddress],[ZIP],[LastLoginTime],[LoginNum],[公司地址],[公司邮箱],[服务项目],[公司规模],[公司网站],[负责人A],[负责人B],[负责人A电话],[负责人B电话],[负责人A手机],[负责人B手机],[工作时间],[五天八小时],[六天八小时],[上班时间],[下班时间],[台式电脑],[笔记本电脑],[服务器],[路由器],[集线器],[Moden],[交换机],[电话交换],[VPN],[邮件服务],[网站服务],[打印机],[复印机],[扫描仪],[其他要求],[五八小时服务],[应急响应次数],[备注],[负责人],[日期时间],[AppendixID] from [Vw_User] ");
	
            List<VwUserEntity> list = new List<VwUserEntity>();
            Database db = GetDatabase();
            using (IDataReader dataReader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
            {
				int seq = 0;
                while (dataReader.Read())
                {	seq++;
                    list.Add(ReaderBind(dataReader,seq));
                }
            }
            return list;
        }
		
		/// <summary>
        /// 获取所有实体的列表总行数
        /// </summary>
        /// <returns></returns>
        public override int GetTotalRecords()
        {
            StringBuilder strSql = new StringBuilder();
			strSql.Append("  select count([ID])  from [Vw_User] ");
	
            Database db = GetDatabase();
            return (int)db.ExecuteScalar(CommandType.Text, strSql.ToString());
        }
		
		/// <summary>
        /// 获取所有实体的列表总行数
        /// </summary>
        /// <returns></returns>
        public override int GetTotalRecords(string sqlCondition)
        {
            StringBuilder strSql = new StringBuilder();
			strSql.Append("  select count([ID])  from [Vw_User]  ");
	
			 if (sqlCondition.Trim() != "")
            {
                strSql.Append(" where " + sqlCondition);
            }
            Database db = GetDatabase();
            return (int)db.ExecuteScalar(CommandType.Text, strSql.ToString());
        }	
		
		
		/// <summary>
        /// 按条件查询,得到一页的对应的结果列表
        /// </summary>
        /// <param name="strWhere">条件</param>
		/// <param name="PageSize">每页大小</param>
		/// <param name="CurrentPageIndex">当前页码</param>
        /// <returns></returns>
		 public override List<VwUserEntity> GetAllByQuery(string strWhere, int PageSize, int CurrentPageIndex)
        {
            StringBuilder strSql = new StringBuilder();
            if (strWhere.Contains("order".ToLower()))
            {
                throw new Exception("分页查询的sql条件中不能包括排序子句，请调用重载方法实现有条件的排序筛选");
            }
		 
			strSql.Append("select top ").Append(PageSize).Append("  [ID],[RoleGroup],[UserName],[PWD],[RealName],[sex],[DepartmentID],[DepartmentName],[job],[State],[WorkNo],[Email],[Tel],[MSN],[QQ],[Remark],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy],[CompanyName],[LawPerson],[linkMan],[linkManMail],[Mobile],[Phone],[FAX],[URL],[sendmsgAddress],[sendGoodsAddress],[ZIP],[LastLoginTime],[LoginNum],[公司地址],[公司邮箱],[服务项目],[公司规模],[公司网站],[负责人A],[负责人B],[负责人A电话],[负责人B电话],[负责人A手机],[负责人B手机],[工作时间],[五天八小时],[六天八小时],[上班时间],[下班时间],[台式电脑],[笔记本电脑],[服务器],[路由器],[集线器],[Moden],[交换机],[电话交换],[VPN],[邮件服务],[网站服务],[打印机],[复印机],[扫描仪],[其他要求],[五八小时服务],[应急响应次数],[备注],[负责人],[日期时间],[AppendixID] from [Vw_User] where ");

			 if (strWhere.Trim() != "")
            {
                strSql.Append("  " + strWhere + " and ");
            }
			  strSql.Append(" ID not in ( ");
			 strSql.Append(" select top ").Append(PageSize*(CurrentPageIndex-1)).Append("  [ID] from [Vw_User] ");

            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere );
            }
			strSql.Append(" ) " );

            List<VwUserEntity> list = new List<VwUserEntity>();
            Database db = GetDatabase();
            using (IDataReader dataReader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
            {
			   int seq = PageSize * (CurrentPageIndex - 1);
                while (dataReader.Read())
                {
					seq++;
                    list.Add(ReaderBind(dataReader, seq));
                }
            }
            return list;
        }
		
		
			/// <summary>
        /// 按条件查询,得到一页的对应的结果列表
        /// </summary>
        /// <param name="strWhere">条件</param>
		/// <param name="PageSize">每页大小</param>
		/// <param name="CurrentPageIndex">当前页码</param>
		/// <param name="strSort">ex:order by id desc</param>
        /// <returns></returns>
		 public override List<VwUserEntity> GetAllByQuery(string strWhere,string strSort, int PageSize, int CurrentPageIndex)
        {
            StringBuilder strSql = new StringBuilder();
            if (strWhere.Contains("order".ToLower()))
            {
                throw new Exception("分页查询的sql条件中不能包括排序子句，请调用重载方法实现有条件的排序筛选");
            }
		 
			strSql.Append("select top ").Append(PageSize).Append("  [ID],[RoleGroup],[UserName],[PWD],[RealName],[sex],[DepartmentID],[DepartmentName],[job],[State],[WorkNo],[Email],[Tel],[MSN],[QQ],[Remark],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy],[CompanyName],[LawPerson],[linkMan],[linkManMail],[Mobile],[Phone],[FAX],[URL],[sendmsgAddress],[sendGoodsAddress],[ZIP],[LastLoginTime],[LoginNum],[公司地址],[公司邮箱],[服务项目],[公司规模],[公司网站],[负责人A],[负责人B],[负责人A电话],[负责人B电话],[负责人A手机],[负责人B手机],[工作时间],[五天八小时],[六天八小时],[上班时间],[下班时间],[台式电脑],[笔记本电脑],[服务器],[路由器],[集线器],[Moden],[交换机],[电话交换],[VPN],[邮件服务],[网站服务],[打印机],[复印机],[扫描仪],[其他要求],[五八小时服务],[应急响应次数],[备注],[负责人],[日期时间],[AppendixID] from [Vw_User] where ");

			 if (strWhere.Trim() != "")
            {
                strSql.Append("  " + strWhere + " and ");
            }
			  strSql.Append(" ID not in ( ");
			 strSql.Append(" select top ").Append(PageSize*(CurrentPageIndex-1)).Append("  [ID] from [Vw_User] ");

            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere+" " ).Append(strSort);
            }
			strSql.Append(" ) " ).Append(strSort);

            List<VwUserEntity> list = new List<VwUserEntity>();
            Database db = GetDatabase();
            using (IDataReader dataReader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
            {
				int seq = PageSize * (CurrentPageIndex - 1);
                while (dataReader.Read())
                {	
					seq++;
                    list.Add(ReaderBind(dataReader, seq));
                }
            }
            return list;
        }
		
		
		/// <summary>
        /// 按条件查询,得到对应的结果列表
        /// </summary>
        /// <param name="strWhere"></param>
        /// <returns></returns>
        public override List<VwUserEntity> GetAllByQuery(string strWhere)
        {
			strWhere = SQLInjectionFilter(strWhere);
            StringBuilder strSql = new StringBuilder();
			strSql.Append("select [ID],[RoleGroup],[UserName],[PWD],[RealName],[sex],[DepartmentID],[DepartmentName],[job],[State],[WorkNo],[Email],[Tel],[MSN],[QQ],[Remark],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy],[CompanyName],[LawPerson],[linkMan],[linkManMail],[Mobile],[Phone],[FAX],[URL],[sendmsgAddress],[sendGoodsAddress],[ZIP],[LastLoginTime],[LoginNum],[公司地址],[公司邮箱],[服务项目],[公司规模],[公司网站],[负责人A],[负责人B],[负责人A电话],[负责人B电话],[负责人A手机],[负责人B手机],[工作时间],[五天八小时],[六天八小时],[上班时间],[下班时间],[台式电脑],[笔记本电脑],[服务器],[路由器],[集线器],[Moden],[交换机],[电话交换],[VPN],[邮件服务],[网站服务],[打印机],[复印机],[扫描仪],[其他要求],[五八小时服务],[应急响应次数],[备注],[负责人],[日期时间],[AppendixID] from Vw_User ");

            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            List<VwUserEntity> list = new List<VwUserEntity>();
            Database db = GetDatabase();
            using (IDataReader dataReader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
            { 
				int seq = 0;
                while (dataReader.Read())
                {
					seq++;
                    list.Add(ReaderBind(dataReader,seq));
                }
            }
            return list;
        }
		
		
		
		/// <summary>
        /// 按条件查询,得到对应的结果列表
        /// </summary>
        /// <param name="strWhere"></param>
		/// <param name="parameters">sql条件中的参数</param>
        /// <returns></returns>
        public override List<VwUserEntity> GetAllByQuery(string strWhere, List<IDataParameter> parameters)
        {
            StringBuilder strSql = new StringBuilder();
			strSql.Append("select [ID],[RoleGroup],[UserName],[PWD],[RealName],[sex],[DepartmentID],[DepartmentName],[job],[State],[WorkNo],[Email],[Tel],[MSN],[QQ],[Remark],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy],[CompanyName],[LawPerson],[linkMan],[linkManMail],[Mobile],[Phone],[FAX],[URL],[sendmsgAddress],[sendGoodsAddress],[ZIP],[LastLoginTime],[LoginNum],[公司地址],[公司邮箱],[服务项目],[公司规模],[公司网站],[负责人A],[负责人B],[负责人A电话],[负责人B电话],[负责人A手机],[负责人B手机],[工作时间],[五天八小时],[六天八小时],[上班时间],[下班时间],[台式电脑],[笔记本电脑],[服务器],[路由器],[集线器],[Moden],[交换机],[电话交换],[VPN],[邮件服务],[网站服务],[打印机],[复印机],[扫描仪],[其他要求],[五八小时服务],[应急响应次数],[备注],[负责人],[日期时间],[AppendixID] from [Vw_User] ");

            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            List<VwUserEntity> list = new List<VwUserEntity>();
            Database db = GetDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());
            foreach (IDataParameter sp in parameters)
            {
                db.AddInParameter(dbCommand, sp.ParameterName, sp.DbType, sp.Value);
            }

            using (IDataReader dataReader = db.ExecuteReader(dbCommand))
            {
				int seq =0 ;
                while (dataReader.Read())
                {
					seq++;
                    list.Add(ReaderBind(dataReader,seq));
                }
            }
            return list;
        }
		
		
		

		
		
		/// <summary>
        /// 获取按条件查询以后的结果列表的前指定rowNumber行记录
        /// </summary>
        /// <param name="strWhere">不带where关键字的SQL条件语句</param>
        /// <param name="rowNumber"></param>
        /// <returns></returns>
        public override List<VwUserEntity> GetAllByQuery(string strWhere, List<IDataParameter> parameters, int rowNumber)
        {

            StringBuilder strSql = new StringBuilder();
			strSql.Append("select top ").Append(rowNumber).Append("  [ID],[RoleGroup],[UserName],[PWD],[RealName],[sex],[DepartmentID],[DepartmentName],[job],[State],[WorkNo],[Email],[Tel],[MSN],[QQ],[Remark],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy],[CompanyName],[LawPerson],[linkMan],[linkManMail],[Mobile],[Phone],[FAX],[URL],[sendmsgAddress],[sendGoodsAddress],[ZIP],[LastLoginTime],[LoginNum],[公司地址],[公司邮箱],[服务项目],[公司规模],[公司网站],[负责人A],[负责人B],[负责人A电话],[负责人B电话],[负责人A手机],[负责人B手机],[工作时间],[五天八小时],[六天八小时],[上班时间],[下班时间],[台式电脑],[笔记本电脑],[服务器],[路由器],[集线器],[Moden],[交换机],[电话交换],[VPN],[邮件服务],[网站服务],[打印机],[复印机],[扫描仪],[其他要求],[五八小时服务],[应急响应次数],[备注],[负责人],[日期时间],[AppendixID] from [Vw_User] ");

            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            List<VwUserEntity> list = new List<VwUserEntity>();
            Database db = GetDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());
            foreach (IDataParameter sp in parameters)
            {
                db.AddInParameter(dbCommand, sp.ParameterName, sp.DbType, sp.Value);
            }

            using (IDataReader dataReader = db.ExecuteReader(dbCommand))
            {	
				int seq = 0;
                while (dataReader.Read())
                {
					seq++;
                    list.Add(ReaderBind(dataReader,seq));
                }
            }
            return list;
        }
		
		
		/// <summary>
        /// 获取按条件查询以后的结果列表的前指定rowNumber行记录
        /// </summary>
        /// <param name="strWhere">不带where关键字的SQL条件语句: AND AA=@AA</param>
        /// <param name="rowNumber"></param>
        /// <returns></returns>
        public override List<VwUserEntity> GetAllByQuery(string strWhere, int rowNumber)
        {
		    strWhere = SQLInjectionFilter(strWhere);
            StringBuilder strSql = new StringBuilder();
			
			strSql.Append("select top ").Append(rowNumber).Append("  [ID],[RoleGroup],[UserName],[PWD],[RealName],[sex],[DepartmentID],[DepartmentName],[job],[State],[WorkNo],[Email],[Tel],[MSN],[QQ],[Remark],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy],[CompanyName],[LawPerson],[linkMan],[linkManMail],[Mobile],[Phone],[FAX],[URL],[sendmsgAddress],[sendGoodsAddress],[ZIP],[LastLoginTime],[LoginNum],[公司地址],[公司邮箱],[服务项目],[公司规模],[公司网站],[负责人A],[负责人B],[负责人A电话],[负责人B电话],[负责人A手机],[负责人B手机],[工作时间],[五天八小时],[六天八小时],[上班时间],[下班时间],[台式电脑],[笔记本电脑],[服务器],[路由器],[集线器],[Moden],[交换机],[电话交换],[VPN],[邮件服务],[网站服务],[打印机],[复印机],[扫描仪],[其他要求],[五八小时服务],[应急响应次数],[备注],[负责人],[日期时间],[AppendixID] from [Vw_User] ");

            if (strWhere.Trim() != "")
            {
                strSql.Append(" where  " + strWhere);
            }
            List<VwUserEntity> list = new List<VwUserEntity>();
            Database db = GetDatabase();
            using (IDataReader dataReader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
            {
				int seq=0;
                while (dataReader.Read())
                {	
					seq++;
                    list.Add(ReaderBind(dataReader,seq));
                }
            }
            return list;
        }
		
		
		
		
		
			
		
		/// <summary>
        /// 对象实体绑定数据
		///生成构造为list的构造器
        /// </summary>
        private VwUserEntity ReaderBind(IDataReader dataReader,int seq)
        {
            ITOMMS.Entity.VwUserEntity entity = new ITOMMS.Entity.VwUserEntity();
			entity.SEQNO = seq;
            object obj;
						 obj=dataReader["ID"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.ID= (int)obj;
			}
			 obj=dataReader["RoleGroup"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.RoleGroup= (int)obj;
			}
			 entity.UserName= dataReader["UserName"].ToString();
			 entity.PWD= dataReader["PWD"].ToString();
			 entity.RealName= dataReader["RealName"].ToString();
			 entity.sex= dataReader["sex"].ToString();
			 obj=dataReader["DepartmentID"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.DepartmentID= (int)obj;
			}
			 entity.DepartmentName= dataReader["DepartmentName"].ToString();
			 entity.job= dataReader["job"].ToString();
			 obj=dataReader["State"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.State= (int)obj;
			}
			 entity.WorkNo= dataReader["WorkNo"].ToString();
			 entity.Email= dataReader["Email"].ToString();
			 entity.Tel= dataReader["Tel"].ToString();
			 entity.MSN= dataReader["MSN"].ToString();
			 entity.QQ= dataReader["QQ"].ToString();
			 entity.Remark= dataReader["Remark"].ToString();
			 obj=dataReader["CreateDate"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.CreateDate= (DateTime)obj;
			}
			 obj=dataReader["CreateBy"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.CreateBy= (int)obj;
			}
			 obj=dataReader["ModifyDate"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.ModifyDate= (DateTime)obj;
			}
			 obj=dataReader["ModifyBy"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.ModifyBy= (int)obj;
			}
			 entity.CompanyName= dataReader["CompanyName"].ToString();
			 entity.LawPerson= dataReader["LawPerson"].ToString();
			 entity.linkMan= dataReader["linkMan"].ToString();
			 entity.linkManMail= dataReader["linkManMail"].ToString();
			 entity.Mobile= dataReader["Mobile"].ToString();
			 entity.Phone= dataReader["Phone"].ToString();
			 entity.FAX= dataReader["FAX"].ToString();
			 entity.URL= dataReader["URL"].ToString();
			 entity.sendmsgAddress= dataReader["sendmsgAddress"].ToString();
			 entity.sendGoodsAddress= dataReader["sendGoodsAddress"].ToString();
			 entity.ZIP= dataReader["ZIP"].ToString();
			 obj=dataReader["LastLoginTime"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.LastLoginTime= (DateTime)obj;
			}
			 obj=dataReader["LoginNum"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.LoginNum= (int)obj;
			}
			 entity.公司地址= dataReader["公司地址"].ToString();
			 entity.公司邮箱= dataReader["公司邮箱"].ToString();
			 entity.服务项目= dataReader["服务项目"].ToString();
			 entity.公司规模= dataReader["公司规模"].ToString();
			 entity.公司网站= dataReader["公司网站"].ToString();
			 entity.负责人A= dataReader["负责人A"].ToString();
			 entity.负责人B= dataReader["负责人B"].ToString();
			 entity.负责人A电话= dataReader["负责人A电话"].ToString();
			 entity.负责人B电话= dataReader["负责人B电话"].ToString();
			 entity.负责人A手机= dataReader["负责人A手机"].ToString();
			 entity.负责人B手机= dataReader["负责人B手机"].ToString();
			 obj=dataReader["工作时间"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.工作时间= (DateTime)obj;
			}
			 obj=dataReader["五天八小时"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.五天八小时= (bool)obj;
			}
			 obj=dataReader["六天八小时"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.六天八小时= (bool)obj;
			}
			 obj=dataReader["上班时间"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.上班时间= (DateTime)obj;
			}
			 obj=dataReader["下班时间"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.下班时间= (DateTime)obj;
			}
			 entity.台式电脑= dataReader["台式电脑"].ToString();
			 entity.笔记本电脑= dataReader["笔记本电脑"].ToString();
			 entity.服务器= dataReader["服务器"].ToString();
			 entity.路由器= dataReader["路由器"].ToString();
			 entity.集线器= dataReader["集线器"].ToString();
			 entity.Moden= dataReader["Moden"].ToString();
			 entity.交换机= dataReader["交换机"].ToString();
			 entity.电话交换= dataReader["电话交换"].ToString();
			 entity.VPN= dataReader["VPN"].ToString();
			 entity.邮件服务= dataReader["邮件服务"].ToString();
			 entity.网站服务= dataReader["网站服务"].ToString();
			 entity.打印机= dataReader["打印机"].ToString();
			 entity.复印机= dataReader["复印机"].ToString();
			 entity.扫描仪= dataReader["扫描仪"].ToString();
			 entity.其他要求= dataReader["其他要求"].ToString();
			 entity.五八小时服务= dataReader["五八小时服务"].ToString();
			 obj=dataReader["应急响应次数"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.应急响应次数= (int)obj;
			}
			 entity.备注= dataReader["备注"].ToString();
			 obj=dataReader["负责人"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.负责人= (int)obj;
			}
			 obj=dataReader["日期时间"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.日期时间= (DateTime)obj;
			}
			 obj=dataReader["AppendixID"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.AppendixID= (int)obj;
			}

            return entity;
        }
		
		
				/// <summary>
        /// 对象实体绑定数据
		///生成构造为list的构造器
        /// </summary>
        private VwUserEntity ReaderBind(IDataReader dataReader)
        {
            ITOMMS.Entity.VwUserEntity entity = new ITOMMS.Entity.VwUserEntity();
			object obj;
						 obj=dataReader["ID"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.ID= (int)obj;
			}
			 obj=dataReader["RoleGroup"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.RoleGroup= (int)obj;
			}
			 entity.UserName= dataReader["UserName"].ToString();
			 entity.PWD= dataReader["PWD"].ToString();
			 entity.RealName= dataReader["RealName"].ToString();
			 entity.sex= dataReader["sex"].ToString();
			 obj=dataReader["DepartmentID"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.DepartmentID= (int)obj;
			}
			 entity.DepartmentName= dataReader["DepartmentName"].ToString();
			 entity.job= dataReader["job"].ToString();
			 obj=dataReader["State"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.State= (int)obj;
			}
			 entity.WorkNo= dataReader["WorkNo"].ToString();
			 entity.Email= dataReader["Email"].ToString();
			 entity.Tel= dataReader["Tel"].ToString();
			 entity.MSN= dataReader["MSN"].ToString();
			 entity.QQ= dataReader["QQ"].ToString();
			 entity.Remark= dataReader["Remark"].ToString();
			 obj=dataReader["CreateDate"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.CreateDate= (DateTime)obj;
			}
			 obj=dataReader["CreateBy"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.CreateBy= (int)obj;
			}
			 obj=dataReader["ModifyDate"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.ModifyDate= (DateTime)obj;
			}
			 obj=dataReader["ModifyBy"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.ModifyBy= (int)obj;
			}
			 entity.CompanyName= dataReader["CompanyName"].ToString();
			 entity.LawPerson= dataReader["LawPerson"].ToString();
			 entity.linkMan= dataReader["linkMan"].ToString();
			 entity.linkManMail= dataReader["linkManMail"].ToString();
			 entity.Mobile= dataReader["Mobile"].ToString();
			 entity.Phone= dataReader["Phone"].ToString();
			 entity.FAX= dataReader["FAX"].ToString();
			 entity.URL= dataReader["URL"].ToString();
			 entity.sendmsgAddress= dataReader["sendmsgAddress"].ToString();
			 entity.sendGoodsAddress= dataReader["sendGoodsAddress"].ToString();
			 entity.ZIP= dataReader["ZIP"].ToString();
			 obj=dataReader["LastLoginTime"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.LastLoginTime= (DateTime)obj;
			}
			 obj=dataReader["LoginNum"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.LoginNum= (int)obj;
			}
			 entity.公司地址= dataReader["公司地址"].ToString();
			 entity.公司邮箱= dataReader["公司邮箱"].ToString();
			 entity.服务项目= dataReader["服务项目"].ToString();
			 entity.公司规模= dataReader["公司规模"].ToString();
			 entity.公司网站= dataReader["公司网站"].ToString();
			 entity.负责人A= dataReader["负责人A"].ToString();
			 entity.负责人B= dataReader["负责人B"].ToString();
			 entity.负责人A电话= dataReader["负责人A电话"].ToString();
			 entity.负责人B电话= dataReader["负责人B电话"].ToString();
			 entity.负责人A手机= dataReader["负责人A手机"].ToString();
			 entity.负责人B手机= dataReader["负责人B手机"].ToString();
			 obj=dataReader["工作时间"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.工作时间= (DateTime)obj;
			}
			 obj=dataReader["五天八小时"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.五天八小时= (bool)obj;
			}
			 obj=dataReader["六天八小时"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.六天八小时= (bool)obj;
			}
			 obj=dataReader["上班时间"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.上班时间= (DateTime)obj;
			}
			 obj=dataReader["下班时间"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.下班时间= (DateTime)obj;
			}
			 entity.台式电脑= dataReader["台式电脑"].ToString();
			 entity.笔记本电脑= dataReader["笔记本电脑"].ToString();
			 entity.服务器= dataReader["服务器"].ToString();
			 entity.路由器= dataReader["路由器"].ToString();
			 entity.集线器= dataReader["集线器"].ToString();
			 entity.Moden= dataReader["Moden"].ToString();
			 entity.交换机= dataReader["交换机"].ToString();
			 entity.电话交换= dataReader["电话交换"].ToString();
			 entity.VPN= dataReader["VPN"].ToString();
			 entity.邮件服务= dataReader["邮件服务"].ToString();
			 entity.网站服务= dataReader["网站服务"].ToString();
			 entity.打印机= dataReader["打印机"].ToString();
			 entity.复印机= dataReader["复印机"].ToString();
			 entity.扫描仪= dataReader["扫描仪"].ToString();
			 entity.其他要求= dataReader["其他要求"].ToString();
			 entity.五八小时服务= dataReader["五八小时服务"].ToString();
			 obj=dataReader["应急响应次数"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.应急响应次数= (int)obj;
			}
			 entity.备注= dataReader["备注"].ToString();
			 obj=dataReader["负责人"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.负责人= (int)obj;
			}
			 obj=dataReader["日期时间"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.日期时间= (DateTime)obj;
			}
			 obj=dataReader["AppendixID"];
			if(obj != null && obj != DBNull.Value)
			{
			 entity.AppendixID= (int)obj;
			}

            return entity;
        }
		
		
		
		 #endregion
		
	}
}
